<?php

class Jd_group_model extends MY_Model {

    public function __construct()
    {
        $this->modelename='Jd_group_model';
        $this->tablename='group';
        parent::__construct();
    }


    /**
     * 获取所有组群
     */
    public function getgrouplist(){
        $sql="select * from jd_group where 1=1";
        if($this->web_id!=1){
            $sql="select * from jd_group where id<>3 AND id<>4 AND id<>5";
        }
       return $this->GetBySql($sql);
    }

    public function getteamlist(){
        $sql="select * from jd_team where 1=1";
        return $this->GetBySql($sql);
    }

    public function getchannellist(){
        $sql="select * from jd_channel where 1=1";
        return $this->GetBySql($sql);
    }


    public function getteambyuserid($id){
        $sql="select * from jd_channel where id=$id";
        return $this->GetBySql($sql,0);
    }














}
